﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using QLNS_Public;
using QLNS_BLL;

namespace QLNS_GiaoDien
{
    public partial class uc_TimKiemLuongNhanVien : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_TimKiemLuongNhanVien()
        {
            InitializeComponent();
        }
        TimKiem_BLL timkiem_bll = new TimKiem_BLL();
        NhanVien_Public nv = new NhanVien_Public();
        ChamCong_Public cc = new ChamCong_Public();
        private void btn_TìmKiem_Click(object sender, EventArgs e)
        {
            if (txt_MaNhanVien.Text != "")
            {
                nv.MaNhanVien = int.Parse(txt_MaNhanVien.Text);
                cc.Thang=int.Parse(cob_Thang.Text);
                cc.Nam = int.Parse(txt_Nam.Text);
                gridControl1.DataSource = timkiem_bll.TimKiem_Luong_MaNhanVien(nv,cc,cc);
            }
            if (txt_HoTen.Text != "")
            {
                nv.HoTen = txt_HoTen.Text;
                cc.Thang = int.Parse(cob_Thang.Text);
                cc.Nam = int.Parse(txt_Nam.Text);
                gridControl1.DataSource = timkiem_bll.TimKiem_Luong_TenNhanVien(nv,cc,cc);
            }
        }


    }
}
